/*
 * @Author: xiongang 407700216@qq.com
 * @Date: 2022-07-09 15:48:11
 * @LastEditors: xiongang 407700216@qq.com
 * @LastEditTime: 2022-07-09 16:58:21
 * @FilePath: \big-screen-vue-datav\vue.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const path = require('path')
const resolve = dir => {
    return path.join(__dirname, dir)
}

module.exports = {
    publicPath: './',
    assetsDir: 'static',
    lintOnSave: process.env.NODE_ENV === 'development',
    productionSourceMap: false,
    chainWebpack(config) {
        config.module
            .rule('svg')
            .exclude.add(resolve('src/assets/icons'))
            .end()
        config.module
            .rule('icons')
            .test(/\.svg$/)
            .include.add(resolve('src/assets/icons'))
            .end()
            .use('svg-sprite-loader')
            .loader('svg-sprite-loader')
            .options({
                symbolId: 'icon-[name]'
            })
            .end()
    }
}